package com.miaoxie.forum.module.im.shared.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by miaoxie on 2017/8/19.
 */
public class IMInitfrend {
    String groupname;
    Integer id;
    List<IMInitUsers> list;


    public IMInitfrend(IMFrendGroupEntity frendGroupEntity,Integer index) {
        this.groupname = frendGroupEntity.getGroupName();
        this.id = index;
        for (IMUsersEntity entity :frendGroupEntity.getFrendsEntities()){
            IMInitUsers imInitUsers = new IMInitUsers(entity);
            if(this.list == null){
                this.list = new ArrayList<>();
            }
            imInitUsers.setStatus("online");
            this.list.add(imInitUsers);
        }
    }

    public String getGroupname() {
        return groupname;
    }

    public void setGroupname(String groupname) {
        this.groupname = groupname;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public List<IMInitUsers> getList() {
        return list;
    }

    public void setList(List<IMInitUsers> list) {
        this.list = list;
    }
}
